import App from "./App.vue"
import { createApp } from "vue"
import "@/styles/tongyong.css"
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

// 导入 ElementPlus 和 样式文件
import ElementPlus from "element-plus"
import "element-plus/dist/index.css"
// 导入路由
import router from "./router"
// 导入pinia
import { createPinia } from "pinia"
// 导入懒加载
import { lazyPlugin } from "./directives"

// 测试接口函数
// import { getCategoryAPI } from "./api/testApi"

// 引入全局组件插件
import { componentPlugin } from '@/components'

const app = createApp(App)
// 注册持久化插件
const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(ElementPlus)
app.use(router)
app.use(lazyPlugin)
app.mount("#app")
app.use(componentPlugin)


// 测试接口调用
// getCategoryAPI().then(res => {
//   console.log(res);
// })
